package com.ssm.controller;

import com.ssm.pojo.Scenerys;
import com.ssm.service.ScenerysService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class ScenerysController {

    @Autowired
    private ScenerysService scenerysService;

    @RequestMapping("getScenerys.html")
    public String getScenerys(Integer id, Model model){
        List<Scenerys> scenerysList = scenerysService.getScenerysById(id);
        model.addAttribute("scenerys",scenerysList);
        return "leading/scenerys";
    }
}
